<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

function getwxsid() {
    return session('_wxsid');
}

function getwxuserid() {
    return session('_wxuserid');
}

function mobile_asterisk($mobile) {
    return substr_replace($mobile, '****', 3, 4);
}


//扣积分
function updateScoreById($id) {
    $mod = M('Score_order');
    $info = $mod->where('id=' . $id)->find();
    deductCredits($info['card_no'], $info['score']);
}


